#include<iostream>
#include<fstream>
using namespace std;

int main(){
    ofstream fout("temp.txt");

    int x, y;
    int i = 0;
    double time = 0;

    cout<<"Please input start point:"<<endl;
    cin>>x>>y;

    while(true){
        fout<<"TrackData1["<<i<<"].cellRow="<<x<<";"<<endl;
        fout<<"TrackData1["<<i<<"].cellColumn="<<y<<";"<<endl;
        fout<<"TrackData1["<<i<<"].time="<<time<<";"<<endl<<endl;


        cout<<"TrackData1["<<i<<"].cellRow="<<x<<";"<<endl;
        cout<<"TrackData1["<<i<<"].cellColumn="<<y<<";"<<endl;
        cout<<"TrackData1["<<i<<"].time="<<time<<";"<<endl;
        cout<<"=====Next====="<<endl;

        char p;
        double t;
        cin>>p>>t;
        if (p=='w'){
            x--;
            time+=t;
            i++;
        } else if (p=='a'){
            y--;
            time+=t;
            i++;
        } else if (p=='s'){
            x++;
            time+=t;
            i++;
        } else if (p=='d'){
            y++;
            time+=t;
            i++;
        } else if (p=='q'){
            break;
        }
    }

    fout.close();
}
